/*
 * Property.h
 *
 *  Created on: 23.09.2011
 *      Author: sili
 */

#ifndef PROPERTY_H_
#define PROPERTY_H_

#include "Controller.h"

#define AALPROP_ARGBCOLOR_TEXT "ARGB text color"
#define AALPROP_ARGBCOLOR_CONTENTPANE "ARGB content pane color"
#define AALPROP_ARGBCOLOR_TEXTPANE "ARGB text pane color"
#define AALPROP_ARGBCOLOR_CONTROLPANE "ARGB control pane color"
#define AALPROP_ARGBCOLOR_SIGNALINFO "ARGB alert info type color"
#define AALPROP_ARGBCOLOR_SIGNALWARN "ARGB alert warn type color"
#define AALPROP_ARGBCOLOR_SIGNALALARM "ARGB alert alarm type color"
#define AALPROP_DEFAULTFLAT "System default flat"
#define AALPROP_AALBACKEND_HOST "AAL-Backend host"
#define AALPROP_AALBACKEND_PORT "AAL-Backend port"
#define AALPROP_TTS_MARY_HOST "TTS Mary host"
#define AALPROP_TTS_MARY_PORT "TTS Mary port"
#define AALPROP_AUDIO_TYPE "Audio type"
#define AALPROP_AUDIO_TYPE_BEEP "beep"
#define AALPROP_AUDIO_TYPE_ESPEAK "espeak"
#define AALPROP_AUDIO_TYPE_MARY "mary"
#define AALPROP_AUDIO_VOLUME "Audio volume"
#define AALPROP_AALITEM_DEFAULT_WIDTH "AALItem default width in percent"
#define AALPROP_AALITEM_DEFAULT_HEIGHT "AALItem default height in percent"

class Property{
public:
	enum PROP_TYPE{INTEGER, STRING, DOUBLE, ENUMARATION, ARGBCOLOR} type;
	int id;
	string name;

	// current values (can be changed by the user)
	//int intValue;
	double doubleValue;
	string stringValue;

	// default values (can't be changed by the user. Are a kind of hint for the frontend so that
	// 				   user may sugesst what kind of property value is it)
	int defaultItValue;
	double defaultDoubleValue;
	string defaultStringValue;

	vector<string> enumerationItems;

	void setIntValue(int _intValue);
	const int getIntValue();

	Property(const char * _name, PROP_TYPE _type, int _defaultIntValue, vector<string> * _enumerationItems = NULL);
	Property(const char * _name, PROP_TYPE _type, double _defaultDoubleValue, vector<string> * _enumerationItems = NULL);
	Property(const char * _name, PROP_TYPE _type, const char * _defaultStringValue, vector<string> * _enumerationItems = NULL);
	virtual ~Property();

	const char * typeToString();

private:
	int intValue;

	void setBasic(const char * _name, PROP_TYPE _type);

};

#endif /* PROPERTY_H_ */
